<?php

	class Results_model extends Model {

		protected $__tbname = 'results';
		protected $__dbconf = '';

		var $id;	//int(11)	Primary Key	Auto Increment	NOT NULL
		var $member_id;	//int(11)			NOT NULL
		var $question_type_id;	//int(11)			NOT NULL
		var $total = 0;	//int(11)			NOT NULL
		var $answered = 0;	//int(11)			NOT NULL
		var $passed = 0;	//int(11)			NOT NULL
		var $date_done;	//datetime			NULL

		protected $__validation_rule = array(
			'id' => array('key' => 'PRI', 'type' => 'int', 'null' => FALSE, 'auto_increment' => TRUE),
			'member_id' => array('key' => 'MUL', 'type' => 'int', 'null' => FALSE),
			'question_type_id' => array('key' => 'MUL', 'type' => 'int', 'null' => FALSE),
			'total' => array('type' => 'int', 'null' => FALSE),
			'answered' => array('type' => 'int', 'null' => FALSE),
			'passed' => array('type' => 'int', 'null' => FALSE),
			'date_done' => array('type' => 'datetime', 'null' => TRUE)
		);
	}
